package com.lw.entity;

import com.lw.common.vo.BasePageQuery;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

import java.io.Serial;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.*;

/**
 * 系统配置表 实体类。
 *
 * @author lw
 * @since 2025年05月28日 00:20:25
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "系统配置表")
@Table("tb_config")
public class TbConfig extends BasePageQuery implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    @Schema(description = "ID")
    private Long id;

    /**
     * 配置名称
     */
    @Schema(description = "配置名称")
    @NotBlank(message = "配置名称不能为空")
    private String configName;

    /**
     * 配置key
     */
    @Schema(description = "配置键")
    @NotBlank(message = "配置键不能为空")
    private String configKey;

    /**
     * 配置值
     */
    @Schema(description = "配置值")
    @NotBlank(message = "配置值不能为空")
    private String configValue;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    /**
     * 创建人ID
     */
    @Schema(description = "创建人ID")
    private Long createBy;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    @Column(onUpdateValue = "now()")
    private LocalDateTime updateTime;

    /**
     * 更新人ID
     */
    @Schema(description = "更新人ID")
    private Long updateBy;

    /**
     * 逻辑删除标识(0-未删除 1-已删除)
     */
    @Schema(description = "逻辑删除标识(0-未删除 1-已删除)")
    private Integer isDeleted;

}
